<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组的扩展</title>

    <script>
        let arr = [
            {
                id: 10086,
                name: "哈哈6",
                age: 50,
                address: "航都路18号",
                car: "BMW",
            },
            {
                id: 10087,
                name: "哈哈7",
                age: 50,
                address: "航都路18号",
                car: "BMW",
            },
            {
                id: 10089,
                name: "哈哈9",
                age: 50,
                address: "航都路18号",
                car: "BMW",
            },
        ];

        //find函数中要传入一个回调函数，当回调函数的逻辑为true，会返回当前对象或者当前数组元素
        let result = arr.find(ele=>ele.id === 10089);

        console.log(result)



    </script>
</head>
<body>

</body>
</html>